home *** CD-ROM | disk | FTP | other *** search
/ Komputer for Alle 2004 E…tra 100 Bedste Programmer / K-CD_2004_Ekstra_100_Gratis_Programmer.iso / Windows / X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ Context Menu Options 6.xpl < prev    next >
Encoding:
XSetup plugin  |  2004-01-16  |  2.5 KB  |  66 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 5.0"
  2. "TYPE"="6"
  3. "COUNT"="1"
  4. "UIPATH"="Appearance\Files&Folders\ANY file"
  5. "NAME"="Any File DOS Prompt Here Context Menu"
  6. "VERSION"="1.00"
  7. "OSVERSION"="0001011"
  8. "LANGUAGE"="VBScript"
  9. "TEXT 1"="Enable "DOS Prompt in containing folder" for any file"
  10. "DESCRIPTION 1"="This setting allows you to assign any file on your computer a new right-click menu (context menu) entry."
  11. "DESCRIPTION 2"="This entry is named "DOS Prompt in containing folder" which will simply open a command prompt (DOS Box) in the folder where the file selected is located."
  12. "DESCRIPTION 3"="For example, when you have activated this setting and use the Search function of Windows to located all files named "*conti.dll". Windows might find a file "my-conti.dll" located in the folder E:\My Stuff\Apps\Conti\. Normally, you would have to open a command prompt and CD to "My Stuff", then CD to "Apps" etc."
  13. "DESCRIPTION 4"="When this setting is activated, you simply right-click the file, select "DOS Prompt in containing folder" and a command prompt will open where the folder E:\My Stuff\Apps\Conti\ is pre-selected. "
  14. "AUTHOR"="Xteq Systems"
  15. "CONTACTURL"="http://www.x-setup.net/"
  16. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  17. "COMMENT 1"="Thanks to Alejandro Yakimovsky 'chaico@ciudad.com.ar' for the original idea!"
  18.  
  19. sName="DOS &Prompt in containing folder"
  20. sNameDOSFile="XSPDOSHere.cmd"
  21.  
  22. sV1a="HKCR\*\Shell\DosHere"
  23. sV1b="HKCR\*\Shell\DosHere\Command"
  24.  
  25.  
  26. Sub Plugin_Initialize 
  27.  s=RegReadValue(sV1a & "\@")
  28.  if Len(s)>0 then
  29.     SetUIElement 1,true
  30.  end if 
  31. End Sub
  32.  
  33. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  34.  sFileName=GetWinSysDir & sNameDOSFile
  35.  sExec=sFileName & " ""%1"""
  36.  
  37.  if GetUIElement(1)=true then
  38.     Call RegWriteValue(sV1a & "\@",sName,1)
  39.     Call RegWriteValue(sV1b & "\@",sExec,1)
  40.    
  41.     Call KillFile(sFileName)
  42.  
  43.     Call TxtOpen(sFileName)
  44.     Call TxtInsertLine(1,"@echo off") 
  45.     Call TxtInsertLine(2,"REM This file has been created by X-Setup Pro, plug-in <XQ Context Menu Options 6.xpl>") 
  46.     Call TxtInsertLine(3,"cmd.exe /k cd ""%~d1%~p1""") 
  47.     Call TxtInsertLine(4,"exit") 
  48.     Call TxtSave()
  49.  
  50.  else 'Disable it!
  51.     if RegPathExists(sV1b) then Call RegDeletePath(sV1b)
  52.     if RegPathExists(sV1a) then Call RegDeletePath(sV1a)
  53.  
  54.     Call KillFile(sFileName)
  55.  end if
  56.  
  57. End Sub
  58.  
  59. Sub Plugin_Terminate 
  60. End Sub
  61.  
  62. Sub KillFile(TheFileName)
  63.     if FileExists(TheFileName) then Call FileDelete(TheFileName)
  64. end Sub
  65.  
  66.